function selRegion(country) {
	$.get('CityRegionServlet?country=' + country, function(responseJson) {    // Execute Ajax GET request on URL of "someservlet" and execute the following function with Ajax response JSON...
		$("select[id='region']").empty();
		var options = '<option disabled="" value="" selected="">Select a region</option>';
		var arrayRegion = new Array();
		$.each(responseJson, function(index, item) {
			arrayRegion.push(item);
		});
		for (var i = 1; i < arrayRegion.length; i++)
			options += '<option value="' + arrayRegion[i] + '">' + arrayRegion[i] + '</option>';
		$("select[id='region']").html(options);
	});
}
function selCity(region) {
	var country = document.getElementById('country');
	c = country.options[country.options.selectedIndex].value;
	$.get('CityRegionServlet?country=' + c +'&region=' + region, function(responseJson2) {    // Execute Ajax GET request on URL of "someservlet" and execute the following function with Ajax response JSON...
		$("select[id='city']").empty();
		var options2 = '<option disabled="" value="" selected="">Select a city</option>';
		var arrayCity = new Array();
		$.each(responseJson2, function(index2, item2) {
			arrayCity.push(item2);
		});
		for (var i = 1; i < arrayCity.length; i++)
			options2 += '<option value="' + arrayCity[i] + '">' + arrayCity[i] + '</option>';
		$("select[id='city']").html(options2);
	});
}
